<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'payment-model-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'label'); ?>
		<?php echo $form->textField($model,'label',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'label'); ?>
	</div>

	

	<div class="row">
		<?php echo $form->labelEx($model,'amount'); ?>
		<?php echo $form->textField($model,'amount',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'amount'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'tag'); ?>
		<?php $this->widget('CAutoComplete', array(
			'model'=>$model,
			'attribute'=>'tag',
			'url'=>array('suggesttags'),
			'multiple'=>true,
			'htmlOptions'=>array('size'=>50),
		)); ?>
		<p class="hint">Please separate different tags with commas.</p>
		<?php echo $form->error($model,'tag'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'source'); ?>
		<?php echo $form->dropDownList($model, 'source',CHtml::listData(SourceModel::model()->findAll(), 'id', 'source_name'), array('empty'=>'Choose source')); ?>
		<?php echo $form->error($model,'source'); ?>
	</div>
        
	<div class="row">
		<?php echo $form->labelEx($model,'destination'); ?>
		<?php echo $form->dropDownList($model, 'destination',CHtml::listData(sourceModel::model()->findAll(), 'id', 'source_name'), array('empty'=>'Choose Destination')); ?>
		<?php echo $form->error($model,'destination'); ?>
	</div>
        
        <div class="row">
		<?php echo $form->labelEx($model,'note'); ?>
		<?php echo $form->textArea($model,'note',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'note'); ?>
	</div>
        
	<div class="row">
		<?php echo $form->labelEx($model,'activedate'); ?>
		
                <?php
                $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                    'model'=>$model,
                     'attribute'=>'activedate',
                        // additional javascript options for the date picker plugin
                         'options'=>array(
                            'showAnim'=>'fold',
                            'dateFormat'=>'yy-mm-dd 00:00:00',
                        ),
                        'htmlOptions'=>array(
                            //'style'=>'height:20px;'
                        ),
                    ));
                ?>
		<?php echo $form->error($model,'activedate'); ?>
	</div>	

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->